<include file="public@header"/>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <div class="layui-page-header">
            <div class="layui-card">
                <div class="layui-page-header-content">
                    <div class="layui-card-body">
                        <div class="layui-ui-page-header-title" >
                            导航管理<span class="layui-badge-rim page-content">网站导航菜单管理及设置</span>
                        </div>
                    </div>
                    <div class="layui-tab layui-tab-brief">
                        <ul class="layui-tab-title">
                            <li class="layui-this"><a href="{:url('nav/index')}">所有导航</a></li>
                            <li><a href="javascript:admin.openIframeLayer('{:url('nav/add')}','添加导航',{btn: ['保存','关闭'],area:['640px','50%'],end:function(){location.reload();}});">添加导航</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-page-content">
            <div class="layui-card">
                <div class="layui-card-body">
                    <form action="{:url('Rbac/listorders')}" method="post" class="layui-form">
                        <php> $is_main=array("1"=>'是',"0"=>'否');</php>
                        <table class="layui-table" lay-even lay-size="lg">
                            <thead>
                            <tr>
                                <th width="50">ID</th>
                                <th>名称</th>
                                <th>主导航</th>
                                <th>描述</th>
                                <th width="212">{:lang('ACTIONS')}</th>
                            </tr>
                            </thead>
                            <tbody>
                            <foreach name="navs" item="vo">
                                <tr>
                                    <td>{$vo.id}</td>
                                    <td>{$vo.name}</td>
                                    <td>
                                        <empty name="vo.is_main">
                                            <span class="layui-badge layui-bg-warning">{$is_main[$vo.is_main]}</span>
                                            <else/>
                                            <span class="layui-badge layui-bg-correct">{$is_main[$vo.is_main]}</span>
                                        </empty>
                                    </td>
                                    <td>{$vo.remark}</td>
                                    <td>
                                        <a class="layui-bo layui-bo-small layui-bo-succes" href="javascript:admin.openIframeLayer('{:url('NavMenu/index',array('nav_id'=>$vo['id']))}','{$vo.name}菜单管理',{area:['80%','70%'],end:function(){location.reload();}});">菜单管理</a>
                                        <div class="new-divider new-divider-vertical"></div>
                                        <a class="layui-bo layui-bo-small layui-bo-checked"  href="javascript:admin.openIframeLayer('{:url('nav/edit',array('id'=>$vo['id']))}','编辑菜单',{btn: ['保存','关闭'],area:['640px','50%'],end:function(){location.reload();}});">{:lang('EDIT')}</a>
                                        <div class="new-divider new-divider-vertical"></div>
                                        <a class="layui-bo layui-bo-small layui-bo-close js-ajax-delete" href="{:url('nav/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
                                    </td>
                                </tr>
                            </foreach>
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<include file="public@script"/>
</body>
</html>